﻿using Client.Players;
using Microsoft.Xna.Framework;

namespace Client.Factories
{
    class PlayerFactory
    {
        private Game1 game;
        private float zOrder, mass, speed;
        private string textureFolder;
        private string[] textureNames;

        public PlayerFactory(Game1 game, float zOrder,string textureFolder, string[] textureNames)
        {
            this.game = game;
            this.zOrder = zOrder;
            this.textureFolder = textureFolder;
            this.textureNames = textureNames;
        }

        public LocalPlayer NewPlayer(long sessionID, int id, short index, Vector2 position, float angle, KeyboardControls controls)
        {
            return new LocalPlayer(game, sessionID, id, textureFolder + textureNames[index], position, angle, index, controls);
        }

        public PlayerRemote NewRemotePlayer(long sessionID, int id, short index, Vector2 position, float angle)
        {
            return new PlayerRemote(game, sessionID, id, textureFolder + textureNames[index], position, angle, index);
        }
    }
}